import * as React from "react";
import { HashRouter,Route,Switch } from 'react-router-dom';
import { App } from './app';
import { About,Header,MembersPage } from "./components";

// @type/react 对react的类型做了检测

// StatelessComponent 无状态组件
// FC 函数最组件
// 最新的 react-router 只是添加了一些 hook，来获取路由和history等参数
export const AppRouter:React.FC<{}> = () => {

    return (
        <HashRouter>
            <div className="container-fluid">
                <Header />
                <Switch>
                    <Route exact path="/" component={<div>this is main page</div>} />
                    <Route exact path="/about" component={About} />
                    <Route exact path="/members" component={MembersPage} />

                </Switch>
            </div>

            

        </HashRouter>
    )
}